/******************************************************************************/
/* processor_def.h                                                            */
/******************************************************************************/

#ifndef __PROCESSOR_DEF_H
#define __PROCESSOR_DEF_H


/********************* Macros & Constants for PROCESSOR ***********************/
#define PROCESS_DATA_EN_FLG       (0xAAAA)
#define PROCESS_DATA_END_EVENT    (0x00000001)


/********************* Prototypes & struct for PROCESSOR **********************/
typedef enum
{
    eDCELL_UINT8 = 0,
    eDCELL_SINT8,
    eDCELL_UINT16,
    eDCELL_SINT16,
    eDCELL_UINT32,
    eDCELL_SINT32,
    eDCELL_FLOAT32
} __TYPE_DCELL_PROC;          // Type data in cell


typedef enum
{
    eTCELL_ADDR = 0,          // cell is pointer at another value
    eTCELL_CONST              // cell is const value
} __TYPE_TCELL_PROC;          // Type cell


typedef enum
{
    ePACT_COPY = 0,
    ePACT_PLUS,
    ePACT_MINUS,
    ePACT_MULTY,
    ePACT_DIVIDE,
    ePACT_AND,
    ePACT_OR
} __TYPE_ACTION_PROC;         // Type action perf w cell


#pragma pack(1)
typedef struct
TYPE_CELL_PROC
{
    TYPE_CELL_PROC() : dcell(0), tcell(0) {}

    uint8_t dcell;
    uint8_t tcell;
} __TYPE_CELL_PROC;           // Basic cell type


typedef struct
CELL_PROC
{
    CELL_PROC() : cell(0xFFFFFFFF) {}

    uint32_t cell;
    __TYPE_CELL_PROC type;
} __CELL_PROC;                // Basic cell


typedef struct
ACTION_SETT_PROC
{
    ACTION_SETT_PROC() : isCellEn(0), action(0) {}

    uint16_t isCellEn;
    __CELL_PROC cell_f;
    __CELL_PROC cell_s;
    __CELL_PROC cell_res;
    uint16_t action;
} __ACTION_SETT_PROC;         // Action on cell settings
#pragma pack()


#endif